Skip to content

Conversation

@Totto16
Copy link
Contributor

@Totto16 Totto16 commented Aug 26, 2025

As meson 1.9.0 release recently, I took a look through the Release Notes

and I saw an interesting feature for formatting, you can now add the cli argument --source-file-path , when using stdin as input file. This helps for error generation. And since we use this feature and have the path available, we can use this in this extension.

SO I added this feature, that, if we detect meson 1.9.0 >= we use this feature.

It required some type changes, but other than that, it only adds this functionality. Feel free to comment on how to better solve the "issue", that muon and meson have different options, but they land in the same array with tools, it uses generics and some casting in some places, to make this work, so that it is type safe (as every check and format function are in a pair, and return / accept the same type of option)

@Jannik2099 Jannik2099 self-assigned this Nov 12, 2025
add support for the new format cli argument "--source-file-path", as this helps in error messages

Signed-off-by: Jannik Glückert <[email protected]>
@Jannik2099
Copy link
Collaborator

It required some type changes, but other than that, it only adds this functionality. Feel free to comment on how to better solve the "issue", that muon and meson have different options, but they land in the same array with tools

I prefer the explicit typing, so this seems good to me.
I've ammended your commit to use an explicit MuonOptions type instead of undefined

@Jannik2099 Jannik2099 added this pull request to the merge queue Nov 12, 2025
Merged via the queue into mesonbuild:main with commit 44f7200 Nov 12, 2025
5 checks passed
@Totto16 Totto16 deleted the meson_v_1_9_0_format branch November 12, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants